{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## N Ways to GPU Programming\n",
    "\n",
    "## Learning Objectives\n",
    "With the release of NVIDIA® CUDA® in 2007, different approaches to GPU programming have evolved. Each approach has its own advantages and disadvantages. By the end of this bootcamp session, participants will have a broader perspective on GPU programming approaches to help them select a programming model that better fits their application's needs and constraints. The bootcamp will teach how to accelerate a popular algorithm of Radial Distribution Function (RDF) using the following methods:\n",
    "\n",
    "* Programming Language Extension: CuPy and Numba\n",
    "\n",
    "Let's start by testing the CUDA Driver and GPU to be used in running the code in this lab:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!nvidia-smi"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<!--**IMPORTANT**: Before we start please download the input file needed for this application from the [Google drive](https://drive.google.com/drive/folders/1aQ_MFyrjBIDMhCczse0S2GQ36MlR6Q_s?usp=sharing) and upload it to the input folder. From the top menu, click on *File*, and *Open* and navigate to `C/source_code/input` or `Python/source_code/input` directory and copy paste the downloaded input file (`alk.traj.dcd`).-->\n",
    "\n",
    "\n",
    "### Bootcamp Outline\n",
    "\n",
    " Throughout the tutorial we will be following the Analysis - Parallelization - Optimization cycle. Let us begin by understanding the NVIDIA Nsight Systems tool ecosystem:   \n",
    "\n",
    "- [Nsight Systems](jupyter_notebook/nsight_systems.ipynb)\n",
    "    - Overview of Nsight profiler tools\n",
    "    - Introduction to Nsight Systems\n",
    "    - How to view the report\n",
    "    - How to use NVTX APIs\n",
    "    - Optimization Steps to parallel programming \n",
    "    \n",
    "- [Nsight Compute](jupyter_notebook/nsight_compute.ipynb)\n",
    "    - Introduction to Nsight Compute\n",
    "    - Overview of sections\n",
    "    - Roofline Charts\n",
    "    - Memory Charts\n",
    "    - Profiling a kernel using CLI\n",
    "    - How to view the report\n",
    "\n",
    "Note: Learn about all terminologies used throught the notebooks in the [GPU Architecture Terminologies](jupyter_notebook/GPU_Architecture_Terminologies.ipynb) notebook.\n",
    "\n",
    "\n",
    "We will be working on porting a radial distribution function (RDF) to GPUs. Please choose one approach within the Python programming language to proceed working on RDF.  \n",
    "    \n",
    "\n",
    "\n",
    "#### Python Programming Language\n",
    "\n",
    "Please read the [RDF Overview](jupyter_notebook/rdf_overview_python.ipynb) to get familiar with how this application works.\n",
    "\n",
    "To get started, click on the following GPU programming approaches in Python:\n",
    "\n",
    "1. [CuPy](../python/jupyter_notebook/cupy/cupy_guide.ipynb)\n",
    "2. [Numba](../python/jupyter_notebook/numba/numba_guide.ipynb)\n",
    "\n",
    "To round up this tutorial, see some final [remarks on Python](jupyter_notebook/Final_Remarks_python.ipynb)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Tutorial Duration\n",
    "The lab material will be presented in an 8-hour session. A Link to the material is available for download at the end of the lab.\n",
    "\n",
    "### Content Level\n",
    "Beginner, Intermediate\n",
    "\n",
    "### Target Audience and Prerequisites\n",
    "The target audience for this lab are researchers, graduate students and developers who are interested in learning about various ways of GPU programming to accelerate scientific applications.\n",
    "\n",
    "Basic experience with Python programming is needed. No GPU programming knowledge is required.\n",
    "\n",
    "-----\n",
    "<!--\n",
    "# <center><div style=\"text-align: center;border:3px; border-style:solid; border-color:#FF0000; padding: 1em;\"> [HOME](../../nways_start.ipynb)</div></center> \n",
    "-->\n",
    "-----\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "## Licensing \n",
    "\n",
    "Copyright © 2022 OpenACC-Standard.org.  This material is released by OpenACC-Standard.org, in collaboration with NVIDIA Corporation, under the Creative Commons Attribution 4.0 International (CC BY 4.0). These materials may include references to hardware and software developed by other entities; all applicable licensing and copyrights apply."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
